	#include <iostream>
	
	using namespace std;
	
	const int N = 1e5 + 10;
	
	int q[N];
	int n, k;
	
	bool check(int x)
	{
		if (x == 0) return true;
		int res = 0;
		
		for (int i = 0; i < n; i ++ )
		{
			res += q[i] / x;
		}
		
		return res < k;
	}
	
	int main()
	{
		cin >> n >> k;
		
		for (int i = 0; i < n; i ++ ) cin >> q[i];
		
		int l = 0;
		int r = 1e8 + 10;
		
		while (l < r)
		{
			int mid = l + r >> 1;
			
			if (check(mid)) r = mid;
			else l = mid + 1;	
		}
		
		 if(l) cout << l - 1 << endl;
		 else cout << l << endl;
		
		return 0;
			
	}
